package com.hunt.service.app.impl;


import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hunt.dao.FinancialDataMapper;
import com.hunt.model.app.FinancialDataInfo;
import com.hunt.model.app.FinancialSimpleDataInfo;
import com.hunt.model.app.PriceLimit;
import com.hunt.model.app.PriceLimitSpecification;
import com.hunt.model.app.nuggets.BlockInfo;
import com.hunt.model.app.nuggets.BlockStock;
import com.hunt.service.app.FinancialDataService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

import java.util.*;
import java.util.concurrent.ConcurrentHashMap;

import static com.hunt.util.FinancialDataConstants.*;

@Service
public class FinancialDataServiceImpl implements FinancialDataService {

    private static final Logger log = LoggerFactory.getLogger(FinancialDataServiceImpl.class);

    @Autowired
    private FinancialDataMapper financialDataMapper;

    @Autowired
    private JedisPool jedisPool;

    @Override
    public List<String> findAllStockCode() {
        return financialDataMapper.findAllStockCode();
    }

    @Override
    public void updateMemoryFinancialData(String dateStr) {
        List<FinancialDataInfo> list = financialDataMapper.findAll();
        if (list == null || list.size() == 0) {
            log.info("<<<<<[同步内存失败,数据为空]");
            return;
        }
    }
}
